#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	int n = 0;
	int row = 0;//控制行
	int col = 0;//控制列
	printf("请输入数字：");
	while (scanf("%d", &n) != EOF)//实现多组输入
	{
		for (row = 1; row <= n; row++)//行
		{
			for (col = 1; col <= n; col++)//列
			{
				if (row == col||n+1==row+col)//控制*的打印
				{
					printf("*");
				}
				else//控制空格的打印
				{
					printf(" ");
				}
			}
			printf("\n");
		}
	}
	return 0;
}